package com.dao;

import com.pojo.Employee;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

@Repository
public interface EmployeeDao {
    //    /**
    //     * 查询所有员工信息以及对应楼
    //     */



    public List<Employee> FindAllEmployee(@Param("position") String position);

    Integer AddEmployee(@Param("username") String username,
                        @Param("password") String password);


    Integer deleteEmployee(String username);

    @Select("select * from user where username = #{username} and roleId = #{roleId}")
    Employee FindEmployeeByUsername(@Param("username") String username,@Param("roleId") String roleId);


    @Select("select * from user where username = #{username}")
    Employee selectByUsername(@Param("username") String username);

}
